@import './reset.scss';
@import 'animate.css';
// 主按钮样式
.global_btn {
    width: fit-content;
    height: 32px;
    // 更现代的渐变背景
    background: linear-gradient(to right, 
      rgba(0, 64, 128, 0.95), 
      rgba(0, 112, 192, 0.95)
    );
    position: relative;
    padding: 0 15px; 
    // 更精致的发光效果
    box-shadow: 
      inset 0 0 15px rgba(0, 210, 255, 0.25),
      0 0 12px rgba(0, 180, 255, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    
    // 光效扫描动画
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: 0.5s;
      z-index: 1;
    }
    
    // 顶部发光边框
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 10%;
      right: 10%;
      height: 1px;
      background: linear-gradient(90deg, 
        transparent,
        rgba(0, 210, 255, 0.2),
        rgba(0, 210, 255, 0.8),
        rgba(0, 210, 255, 0.2),
        transparent
      );
      opacity: 0.8;
      z-index: 0;
    }
    
    // 图标样式
    .el-icon {
      font-size: 16px;
      transition: transform 0.3s ease;
      margin-right: 5px;
      filter: drop-shadow(0 0 2px rgba(0, 209, 237, 0.5));
      z-index: 2;
    }
    
    span {
      position: relative;
      z-index: 2;
    }
    
    // 悬停效果
    &:hover {
      background: linear-gradient(to right, 
        rgba(0, 85, 150, 0.95), 
        rgba(0, 130, 210, 0.95)
      );
      box-shadow: 
        inset 0 0 20px rgba(0, 210, 255, 0.35),
        0 0 15px rgba(0, 210, 255, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.4);
      transform: translateY(-2px);
      color: #ffffff;
      
      &::before {
        left: 100%; // 触发光效扫描
      }
  
      .el-icon {
        transform: scale(1.15);
      }
    }
  
    // 点击效果
    &:active {
      transform: translateY(1px);
      box-shadow: 
        inset 0 0 10px rgba(0, 210, 255, 0.15),
        0 0 5px rgba(0, 210, 255, 0.1);
      background: linear-gradient(to right, 
        rgba(0, 50, 100, 0.95), 
        rgba(0, 90, 160, 0.95)
      );
    }

    // 全新Loading状态样式
    &.is-loading {
      pointer-events: none;
      position: relative;
      overflow: hidden;
      
      &::before {
        animation: light-scan 1.5s infinite;
      }
      
      // 加载中脉冲动画
      animation: button-pulse 1.5s infinite ease-in-out;
      
      .el-icon {
        animation: icon-pulse 1.5s infinite ease-in-out;
      }
    }
    
    // 加载效果容器
    .global-btn-loading-effect {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: linear-gradient(to right, 
        rgba(0, 60, 120, 0.95), 
        rgba(0, 100, 180, 0.95)
      );
      border-radius: 4px;
      z-index: 10;
      
      .loading-text {
        font-size: 13px;
        color: #ffffff;
        text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
        animation: text-pulse 1.5s infinite ease-in-out;
        letter-spacing: 0.5px;
      }
      
      .loading-spinner {
        position: relative;
        width: 16px;
        height: 16px;
        
        .spinner-ring {
          position: absolute;
          width: 100%;
          height: 100%;
          border-radius: 50%;
          border: 1.5px solid transparent;
          
          &:nth-child(1) {
            border-top-color: #ffffff;
            border-right-color: rgba(255, 255, 255, 0.3);
            animation: spin 1s linear infinite;
            filter: drop-shadow(0 0 2px rgba(0, 209, 237, 0.7));
          }
          
          &:nth-child(2) {
            width: 70%;
            height: 70%;
            top: 15%;
            left: 15%;
            border-left-color: rgba(0, 212, 255, 0.9);
            border-bottom-color: rgba(0, 212, 255, 0.5);
            animation: spin 1.5s linear infinite reverse;
          }
        }
        
        .spinner-dot {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 4px;
          height: 4px;
          background-color: #ffffff;
          border-radius: 50%;
          transform: translate(-50%, -50%);
          box-shadow: 0 0 5px rgba(0, 212, 255, 0.8);
          animation: pulse 1.5s infinite ease-in-out;
        }
      }
    }
}
  
// 取消按钮样式
.global_btn_cancel {
    width: fit-content;
    height: 32px;
    // 更现代的渐变背景
    background: linear-gradient(to right,
      rgba(35, 45, 65, 0.8), 
      rgba(50, 60, 80, 0.8)
    );
    position: relative;
    padding: 0 15px;
    
    // 更精致的边框效果
    border: 1px solid rgba(100, 140, 180, 0.2);
    box-shadow: 
      inset 0 0 10px rgba(31, 152, 203, 0.1),
      0 0 8px rgba(0, 0, 0, 0.2);
    
    border-radius: 4px;
    color: rgba(200, 220, 240, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
  
    // 图标样式
    .el-icon {
      font-size: 16px;
      transition: transform 0.3s ease;
      margin-right: 5px;
      filter: drop-shadow(0 0 2px rgba(0, 209, 237, 0.3));
      z-index: 2;
    }
    
    span {
      position: relative;
      z-index: 2;
    }
    
    // 光效扫描动画
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transition: 0.5s;
      z-index: 1;
    }
    
    // 顶部发光边框
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 15%;
      right: 15%;
      height: 1px;
      background: linear-gradient(90deg, 
        transparent,
        rgba(100, 140, 180, 0.2),
        rgba(100, 140, 180, 0.5),
        rgba(100, 140, 180, 0.2),
        transparent
      );
      opacity: 0.5;
      z-index: 0;
    }
  
    // 悬停效果
    &:hover {
      background: linear-gradient(to right,
        rgba(45, 55, 75, 0.85), 
        rgba(60, 70, 90, 0.85)
      );
      border-color: rgba(0, 209, 237, 0.3);
      color: rgba(220, 235, 255, 0.95);
      box-shadow: 
        inset 0 0 15px rgba(31, 152, 203, 0.15),
        0 0 10px rgba(0, 209, 237, 0.15);
      transform: translateY(-2px);
      
      &::before {
        left: 100%; // 触发光效扫描
      }
  
      .el-icon {
        transform: scale(1.15);
      }
    }
  
    // 点击效果
    &:active {
      transform: translateY(1px);
      box-shadow: 
        inset 0 0 8px rgba(31, 152, 203, 0.1),
        0 0 3px rgba(0, 0, 0, 0.1);
      background: linear-gradient(to right,
        rgba(30, 35, 50, 0.85), 
        rgba(40, 50, 70, 0.85)
      );
    }
    
    // Loading状态样式
    &.is-loading {
      pointer-events: none;
      position: relative;
      overflow: hidden;
      
      &::before {
        animation: light-scan 2s infinite;
        opacity: 0.5;
      }
      
      // 加载中脉冲动画
      animation: cancel-button-pulse 1.5s infinite ease-in-out;
      
      .el-icon {
        animation: icon-pulse 1.5s infinite ease-in-out;
      }
    }
    
    // 加载效果容器
    .global-btn-loading-effect {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: linear-gradient(to right,
        rgba(35, 45, 65, 0.9), 
        rgba(50, 60, 80, 0.9)
      );
      border-radius: 4px;
      z-index: 10;
      
      .loading-text {
        font-size: 13px;
        color: rgba(200, 220, 240, 0.9);
        text-shadow: 0 0 5px rgba(0, 212, 255, 0.2);
        animation: text-pulse 1.5s infinite ease-in-out;
        letter-spacing: 0.5px;
      }
      
      .loading-spinner {
        position: relative;
        width: 16px;
        height: 16px;
        
        .spinner-ring {
          position: absolute;
          width: 100%;
          height: 100%;
          border-radius: 50%;
          border: 1.5px solid transparent;
          
          &:nth-child(1) {
            border-top-color: rgba(200, 220, 240, 0.9);
            border-right-color: rgba(200, 220, 240, 0.2);
            animation: spin 1s linear infinite;
          }
          
          &:nth-child(2) {
            width: 70%;
            height: 70%;
            top: 15%;
            left: 15%;
            border-left-color: rgba(100, 180, 220, 0.7);
            border-bottom-color: rgba(100, 180, 220, 0.3);
            animation: spin 1.5s linear infinite reverse;
          }
        }
        
        .spinner-dot {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 3px;
          height: 3px;
          background-color: rgba(200, 220, 240, 0.9);
          border-radius: 50%;
          transform: translate(-50%, -50%);
          box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
          animation: pulse 1.5s infinite ease-in-out;
        }
      }
    }
}
  
// 禁用状态
.global_btn[disabled],
.global_btn_cancel[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(40%);
  transform: none !important;
  
  &:hover {
    transform: none;
    box-shadow: inherit;
    background: inherit;
  }
  
  &::before {
    display: none;
  }
}

// 加载动画
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes button-pulse {
  0%, 100% {
    box-shadow: 
      inset 0 0 15px rgba(0, 210, 255, 0.25),
      0 0 12px rgba(0, 180, 255, 0.2);
  }
  50% {
    box-shadow: 
      inset 0 0 25px rgba(0, 210, 255, 0.4),
      0 0 20px rgba(0, 210, 255, 0.35);
  }
}

@keyframes cancel-button-pulse {
  0%, 100% {
    box-shadow: 
      inset 0 0 10px rgba(31, 152, 203, 0.1),
      0 0 5px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      inset 0 0 15px rgba(31, 152, 203, 0.2),
      0 0 10px rgba(31, 152, 203, 0.15);
  }
}

@keyframes text-pulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

@keyframes icon-pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes light-scan {
  0% {
    left: -100%;
    opacity: 0.7;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

  